package com.tinycomment.business;

import java.util.Collection;

import com.tinycomment.dao.ExampleDao;
import com.tinycomment.dbutils.Parameter;
import com.tinycomment.idao.IExample;
import com.tinycomment.model.Example;

/*
 *@author xiaoguang.gao@oracle.com
 *@version 2013-6-22 
 */
public class ExampleBus implements IBus<Example>{
	IExample operate = null;
	public ExampleBus(){
		this.operate = new ExampleDao();
	}
	@Override
	public Example GetModel(int key) {
		return this.operate.getModel(key);
	}

	@Override
	public Boolean Add(Example model) {
		return this.operate.Add(model);
	}

	@Override
	public Boolean Update(Example model) {
		return this.operate.Update(model);
	}

	@Override
	public Boolean Delete(Example model) {
		return this.operate.Delete(model.getExampleID());
	}

	@Override
	public Collection<Example> GetModelSet(String condition, Parameter[] params) {
		// TODO Auto-generated method stub
		return this.operate.getModelSet(condition, params);
	}

	@Override
	public Collection<Example> GetModelSet() {
		// TODO Auto-generated method stub
		return this.GetModelSet("1=1", null);
	}
	


}
